package com.passioneffect.widgets {
	import flash.display.DisplayObject;
	
	import gs.TweenMax;		

	/**
	 * @author Passion Effect
	 */
	public class Gray {
		private var _time:Number=1;
		private var _target : DisplayObject;
		private var _saturation:Number=0;
		
		public function Gray(mc:DisplayObject,time:Number=1,saturation:Number=0) {
			this._target=mc;
			this._time=time;
			this._saturation=saturation;
		}

		public function open():void{
			
			TweenMax.to(_target,_time,{colorMatrixFilter:{saturation:_saturation}});
		}

		public function close() : void {
			TweenMax.to(_target,_time,{colorMatrixFilter:{situration:1}});
		}
	}
}
